package experiment10;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ScrollBar;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.Line;
import javafx.stage.Stage;

public class No_4 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {


        Arc arc1=new Arc(100, 140, 50, 20, 0, 180);
        arc1.getStrokeDashArray().addAll(6.0, 21.0);
        arc1.setFill(Color.WHITE);
        arc1.setStroke(Color.BLACK);

        Arc arc2=new Arc(100,40,50,20,180,180);
        arc2.setStroke(Color.BLACK);
        arc2.setFill(Color.WHITE);

        Arc arc3=new Arc(100,40,50,20,0,180);
        arc3.setStroke(Color.BLACK);
        arc3.setFill(Color.WHITE);

        Arc arc4=new Arc(100, 140, 50, 20, 180, 180);
        arc4.setFill(Color.WHITE);
        arc4.setStroke(Color.BLACK);

        Line line1=new Line(150,40,150,140);
        Line line2=new Line(50,40,50,140);

        Pane pane=new Pane();
        pane.getChildren().addAll(arc1,arc2,arc3,arc4,line1,line2);

        primaryStage.setTitle("圆柱");
        primaryStage.setScene(new Scene(pane,400,400));
        primaryStage.show();
    }
}
